<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
	
	<h:head>
		<title>操作日志查询</title>
		<link href="../../css/component.css" rel="stylesheet" type="text/css" />
	</h:head>


	<h:body>
		<ui:param name="bean" value="#{sysLogAction}" />
	
		<span class="pagetitle">操作日志查询</span>
		<p:separator />

		<h:form id="fsearch">
			<p:growl id="growl" showDetail="true" sticky="true" />
			<h:outputLabel value="操作者：" />
			<p:inputText value="#{bean.input.operator}" />
			&#160;&#160;&#160;
			
			<h:outputLabel value="开始时间：" />
			<p:calendar value="#{bean.input.startTime}" pattern="yyyy-MM-dd HH:mm" style="text-align:center" />
			&#160;&#160;&#160;
			
			<h:outputLabel value="截止时间：" />
			<p:calendar value="#{bean.input.time}" pattern="yyyy-MM-dd HH:mm" style="text-align:center" />
			&#160;&#160;&#160;
			
			<h:outputLabel value="内容关键字：" />
			<p:inputText value="#{bean.input.keyword}" />
			&#160;&#160;&#160;
			
			<p:commandButton value="查询" action="#{bean.search}" update=":data" ajax="false" />
		</h:form>

		<!-- 展示所有日志数据 -->
		<h:form id="dform">
			<div class="data" id="data">
				<p:panel id="panel" header="查询结果" style="margin-bottom:10px;">
					<p:dataTable id="dlist" var="log" value="#{bean.logList}" scrollable="true" resizableColumns="true" paginator="true" paginatorPosition="top" paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown} {Exporters}" rowsPerPageTemplate="15,30" rows="30" style="text-align:center;">
						<f:facet name="{Exporters}">
						 	<h:commandLink styleClass="exporter">
						        <p:graphicImage url="/resources/images/excel.png" height="25px"/>
						        <p:dataExporter type="xls" target="dlist" fileName="sysLog-#{pageHelper.getNewDateDetailStr()}" />
						    </h:commandLink>
					    </f:facet>
						
						<p:column headerText="操作者" style="width:150px;text-align:center" >
							<h:outputText value="#{log.operator}" />
						</p:column>
						<p:column headerText="操作时间" style="width:150px;text-align:center" >
							<h:outputText value="#{bean.formatTime(log.operTime)}" />
						</p:column>
						<p:column headerText="内容">
							<h:outputText value="#{log.action}" />
						</p:column>
					</p:dataTable>
				</p:panel>
			</div>
		</h:form>

		<!-- 页脚 -->
		<div class="footer"></div>
	</h:body>
</html>
